<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改考勤')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-attend-edit" th:object="${recordAttend}">
            <input name="attendId" id="attendId" th:field="*{attendId}" type="hidden">
            <input name="deptId" th:field="*{deptId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">考勤时间：</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control time-input" th:field="*{attendMonth}" data-type="month" id="attendMonth" name="attendMonth"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">考勤部门：</label>
                <div class="col-sm-8">
                    <input id="deptName" class="form-control" type="text" disabled th:field="*{deptName}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">考勤人：</label>
                <div class="col-sm-8">
                    <input id="attendUser" class="form-control" type="text" th:field="*{attendUser}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">科室负责人：</label>
                <div class="col-sm-8">
                    <input id="deptUser" class="form-control" type="text" th:field="*{deptUser}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <textarea name="remark" class="form-control">[[*{remark}]]</textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "record/attend";
        $("#form-attend-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-attend-edit').serialize());
            }
        }
    </script>
</body>
</html>